Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

Add TO Go cdns/health and cdns/{name}/health#2305

Merged
mitchell852 merged 1 commit into
apache:masterfrom
rob05c:to-go-cdnhealth
Dec 12, 2019
Merged

Add TO Go cdns/health and cdns/{name}/health#2305
mitchell852 merged 1 commit into
apache:masterfrom
rob05c:to-go-cdnhealth

Conversation

@rob05c

@rob05c rob05c commented May 19, 2018

Copy link
Copy Markdown
Member

Rewrites /cdns/health and /cdns/{{name}}/health to Go. Closes #3778 and closes #3779 .

@asfgit

asfgit commented May 19, 2018

Copy link
Copy Markdown
Contributor

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/incubator-trafficcontrol-PR/1623/
Test PASSed.

@rob05c rob05c force-pushed the to-go-cdnhealth branch from b3642cd to 3dfe47a Compare May 20, 2018 00:38
@asfgit

asfgit commented May 20, 2018

Copy link
Copy Markdown
Contributor

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/incubator-trafficcontrol-PR/1624/
Test PASSed.

@rob05c rob05c force-pushed the to-go-cdnhealth branch from 3dfe47a to 33a135f Compare May 22, 2018 15:00
@asfgit

asfgit commented May 22, 2018

Copy link
Copy Markdown
Contributor

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/incubator-trafficcontrol-PR/1646/
Test PASSed.

@rob05c rob05c force-pushed the to-go-cdnhealth branch from 33a135f to a650da2 Compare June 5, 2018 14:49
@asfgit

asfgit commented Jun 5, 2018

Copy link
Copy Markdown
Contributor

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/incubator-trafficcontrol-PR/1761/
Test PASSed.

@rob05c rob05c force-pushed the to-go-cdnhealth branch from a650da2 to 04fc4fb Compare June 23, 2018 16:20
@asfgit

asfgit commented Jun 23, 2018

Copy link
Copy Markdown
Contributor

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/1896/
Test PASSed.

@rob05c rob05c force-pushed the to-go-cdnhealth branch from 04fc4fb to 379389c Compare June 23, 2018 17:19
@asfgit

asfgit commented Jun 23, 2018

Copy link
Copy Markdown
Contributor

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/1897/
Test PASSed.

@rob05c rob05c force-pushed the to-go-cdnhealth branch 2 times, most recently from 8b9adb6 to 7ec9108 Compare June 23, 2018 18:50
@asfgit

asfgit commented Jun 23, 2018

Copy link
Copy Markdown
Contributor

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/1900/
Test PASSed.

@asfgit

asfgit commented Jun 25, 2018

Copy link
Copy Markdown
Contributor

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/1907/
Test PASSed.

Comment thread lib/go-tc/enum.go Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we think this should be a config? I have seen several times now where the type "RASCAL" was hard-coded and we had to change our TM type. IMO you should be able to make the type whatever you want and it should work.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should definitely be a config, once we've moved everything to Go. But right now, it's still hard-coded all over Perl.

I don't think we should make a config yet, which would make people think they could change it, when it'd still break to be anything but "RASCAL".

But definitely +100 when it's all Go, and we can set one variable. I've wanted to change our db "RASCAL" type to something like "monitor" for ages.

@dneuman64

Copy link
Copy Markdown
Contributor

I would expect a heathtest.go to be a part of this PR is there a reason it is not included?

@rob05c

rob05c commented Jun 26, 2018

Copy link
Copy Markdown
Member Author

Not sure what you mean. What would be in healthtest.go?

@rob05c rob05c force-pushed the to-go-cdnhealth branch from 2a04b2f to 5b96260 Compare July 5, 2018 19:49
@asfgit

asfgit commented Jul 5, 2018

Copy link
Copy Markdown
Contributor

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/1998/
Test PASSed.

@rob05c rob05c force-pushed the to-go-cdnhealth branch from 5b96260 to 800af8b Compare July 9, 2018 16:49
@asfgit

asfgit commented Jul 9, 2018

Copy link
Copy Markdown
Contributor

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/2039/
Test PASSed.

@rob05c rob05c force-pushed the to-go-cdnhealth branch from 800af8b to 66da185 Compare July 18, 2018 14:49
@asfgit

asfgit commented Jul 19, 2018

Copy link
Copy Markdown
Contributor

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/2114/
Test FAILed.

@mitchell852 mitchell852 added the Traffic Ops related to Traffic Ops label Sep 13, 2019
@mitchell852 mitchell852 added this to the Go Rewrite milestone Sep 13, 2019
@mitchell852 mitchell852 added tech debt rework due to choosing easy/limited solution and removed new feature A new feature, capability or behavior labels Sep 13, 2019
@mitchell852 mitchell852 self-assigned this Sep 13, 2019
@asf-ci

asf-ci commented Sep 16, 2019

Copy link
Copy Markdown
Contributor

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/4256/
Test PASSed.

@mhoppa mhoppa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor comment - also should we be adding tests?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rob05c rob05c Sep 16, 2019

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, they were copy-pasted, because the PRs were open at the same time, with the intention of combining them after one was merged to master. Good catch. I'll do that now.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Also with GetCRConfig.

@rob05c

rob05c commented Sep 16, 2019

Copy link
Copy Markdown
Member Author

also should we be adding tests?

This endpoint calls out to Traffic Monitor. The "API Test" framework doesn't currently support Monitors. It's also not really possible to unit test; we could mock everything, but it wouldn't be testing much of anything at that point (which is why we've been doing "API Tests" for TO).

We should definitely test this (and other Monitor endpoints) when the API Tests support it. But it'll be a nontrivial amount of work to add that support.

I just made #3924 - we had one for Riak, but not Monitors.

mitchell852
mitchell852 previously approved these changes Sep 18, 2019
@mitchell852

mitchell852 commented Sep 18, 2019

Copy link
Copy Markdown
Member

@rob05c and @mhoppa - i believe this PR is going to have the same problem that was addressed in #3927 , right?

@mhoppa

mhoppa commented Sep 19, 2019

Copy link
Copy Markdown
Contributor

Yes it will have the same problem

@mitchell852 mitchell852 dismissed their stale review September 25, 2019 20:36

there is a bug

@mitchell852 mitchell852 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rob05c - i think this PR needs the changes that were made in #3927

@rob05c

rob05c commented Sep 27, 2019

Copy link
Copy Markdown
Member Author

I'd like to look into #3927 first. Not sure when I'll have time.

It shouldn't be necessary, HTTP/2 is backwards-compatible by design. If a client tries to use H2, and a server doesn't support it, it automatically falls back to H1. If it doesn't, the Server is violating HTTP/1.1. So, it shouldn't ever be necessary to forcibly disable it. I'd like to at least understand why it's necessary.

@mitchell852 mitchell852 removed their assignment Dec 3, 2019
@asf-ci

asf-ci commented Dec 11, 2019

Copy link
Copy Markdown
Contributor

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/4908/

@rob05c

rob05c commented Dec 11, 2019

Copy link
Copy Markdown
Member Author

Ok, I investigated, determined Go 1.13 http.Transport fundamentally doesn't support H2 Proxies. I added the code from #3927 and a comment to that effect. See golang/go#26479 "We only support http1 proxies currently."

Rebased; manually tested again, still works as expected, still matches Perl.

@asf-ci

asf-ci commented Dec 11, 2019

Copy link
Copy Markdown
Contributor

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/4910/

@asf-ci

asf-ci commented Dec 11, 2019

Copy link
Copy Markdown
Contributor

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/4913/

@mhoppa mhoppa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code looks good and tests locally good

@mitchell852 mitchell852 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

appears to work as the Perl did.

@mitchell852 mitchell852 merged commit 0b02a3c into apache:master Dec 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

tech debt rework due to choosing easy/limited solution Traffic Ops related to Traffic Ops

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rewrite /cdns/{{name}}/health to Go Rewrite /cdns/health to Go

8 participants